@extends('web.layouts.app')

@section('styles')
    <link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/index.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('resources/web/css/ucenter.css')}}">
@endsection

@section('content')
    <div class="uc-wrap swrap mt20">
        <div class="uc-side L">
            <div class="uc-nav">
                <ul>
                    @include('web.user_center.menu')
                </ul>
            </div>
        </div>
       <div class="uc-main uc-mainbg R">
		<!--菜单选项-->
		<ul class="user-main-top-tab">
			<li><a href="{{ action('UserCenter\UserCenterController@balanceOfPayments', ['menu' => 5]) }}">收支明细</a></li>
			<li class="active"><a href="{{ action('UserCenter\UserCenterController@rechargeRecord', ['menu' => 5]) }}">充值记录</a></li>
			<li><a href="{{ action('UserCenter\UserCenterController@presentRecord',['menu' => 5]) }}">提现记录</a></li>
		</ul>
		<!--查询表单-->
		<div class="user-time-search ml20">
			<form method="get" action="{{ action('UserCenter\UserCenterController@rechargeRecord') }}">
				<label>
					充值状态 
					<div class="select">
						<select name="status">
							<option value="">all</option>
							<option value="Y" {{ $query['status'] == 'Y'?'selected=selected':'' }}>充值成功</option>
							<option value="N" {{ $query['status'] == 'N'?'selected=selected':'' }}>处理中</option>
							<option value="N" {{ $query['status'] == 'F'?'selected=selected':'' }}>充值失败</option>
						</select>
					</div>
				</label>
				<span class="ml20">起止日期</span>
				<input type="text" name="startTime" value="{{ $query['startTime'] }}"  class="date-txt Wdate" onclick="WdatePicker();"> -
				<input type="text" name="endTime" value="{{ $query['endTime'] }}" class="date-txt Wdate" onclick="WdatePicker();">
				<input type="submit" class="btn" value="搜索">
			</form>
		</div>
		<!--列表-->
		<div class="user-item-list">
			<ul class="data-list zhiqu-log-list">
				<li class="th">
					<div class="col-id">充值流水号</div>
					<div class="col-time">充值时间</div>
					<div class="col-time">处理时间</div>
					<!-- <div class="col-channel">资金渠道</div> -->
					<div class="col-money">充值金额(元)</div>
					<div class="col-status">充值状态</div>
				</li>
			@forelse($data as $d)
				<li>
					<div class="col-id">{{$d->sn}}</div>
					<div class="col-time">{{ $d->created_at??'--' }}</div>
					<div class="col-time">{{ $d->pay_time??'--' }}</div>
					<!-- <div class="col-channel">{{ $d->card_number??'--' }}</div> -->	
					<div class="col-money">{{ $d->money }}</div>
					<div class="col-status">
						@if($d->status == "0")
							<span class="blue">处理中</span>
						@elseif($d->status == '1')
							<span class="green">充值成功</span>
						@elseif($d->status == '-1')
							<span class="red">充值失败</span>
						@else
							<span class="red">状态异常</span>
						@endif
					</div>
				</li>	
				@empty
				<li>您还没有充值过~</li>
			@endforelse
			</ul>
			<div class="uc-page-box text-right">
				{{ $links }}
			</div>
		</div>

	</div>
</div>
@endsection

@section('scripts')
    <script src="{{ asset('resources/web/js/index.js') }}"></script>
	<script type="text/javascript" src="{{ asset('resources/web/plugins/datePicker/WdatePicker.js')}}"></script>

@endsection